const Koa = require('koa');
const logger = require('koa-logger');
const session = require('koa-session');
const app = new Koa();
app.keys=['Hi Luke'];
app.use(logger());
app.use(session(app));
app.use(ctx=>{
    if(ctx.path=="/" ){
        ctx.body="hello world"
    }else if(ctx.path =="/js"){
        ctx.body="JavaScript"
    }
})
app.listen(8080)